package jwr.basic;

import java.util.Scanner;

public class J06_SungJuckV2c {

	public static void main(String[] args) {
		
Scanner sc = new Scanner(System.in);
		
		String name;
		int kor, eng, mat, isLoop;
		
		final String TITLE = "성적 처리 프로그램"; 
		final String HDRLINE = "----------------"; 
		final String GUIDE1 = "이름은?"; 
		final String GUIDE2 = "국어는?"; 
		final String GUIDE3 = "영어는?"; 
		final String GUIDE4 = "수학은?"; 
		final String GUIDE5 = "계속 입력? (예 : 1, 아니오 : 0)";
		
		System.out.println(TITLE);
		
		do{
			System.out.println(HDRLINE);
			System.out.println(GUIDE1);
			name = sc.next();
			System.out.println(GUIDE2);
			kor = sc.nextInt();
			System.out.println(GUIDE3);
			eng = sc.nextInt();
			System.out.println(GUIDE4);
			mat = sc.nextInt();
			System.out.println(GUIDE5);
			isLoop = sc.nextInt();
			if(isLoop !=1 && isLoop !=0){
				do{
					System.out.println("계속 입력? (예 : 1, 아니오 : 0)");
					isLoop = sc.nextInt();
				}while(isLoop !=1 && isLoop !=0);
			}
		}while(isLoop==1);
		System.out.println("성적입력을 마칩니다."); 
		sc.close();
	}

}
